package com.xiaoyy.core.common.enums;

public enum BoolStrEnum {
    TRUE("true", "有效/启用/是"),
    FALSE("false", "无效/锁定/否");

    private String type;
    private String name;

    BoolStrEnum(String type, String name) {
        this.type = type;
        this.name = name;
    }

    public String getType() {
        return this.type;
    }

    public String getName() {
        return this.name;
    }

    public static BoolStrEnum getByType(String type) {

        for (BoolStrEnum typeEnum : values()) {
            if (typeEnum.getType() .equals(type) ) {
                return typeEnum;
            }
        }
        return null;
    }
}
